<style>
body {
	background: url('../addons/jy_kefu/resource/images/chat-bg.png') no-repeat center center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}
</style>
<div class="fui-page">
<div class="fui-content">
	<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
				<div class="carousel-inner" role="listbox" style="height:auto">
					<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.hdp">
						<a href="{{item.url}}">
							<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
						</a>
					</div>
				</div>
				<style>
						.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
						.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
				</style>
				<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
					<div class="fui-swipe-bullet" ng-repeat="item in pagedata.hdp" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
				</div>
	</div>
	<div class="fui-list-group merchgroup" style="margin-bottom:60px">
				<div class="fui-list jump" ng-repeat="item in pagedata.list">
					<a class="fui-list-media">
						<img class="round" src="{{tomedia(item.picurl)}}" />
					</a>
					<a class="fui-list-inner">
						<div class="title">{{item.nickname}}</div>
					</a>
					<a ng-if="item.kefuqr" ng-click="pagedata.getmember.name=item.nickname;pagedata.getmember.kefuqr=item.kefuqr" class="fui-list-media" href="javascript:;" onclick="$('#showqr').modal();">
						<img style="width:1.5rem;height:1.5rem" class="round" src="../core/resource/images/code.jpg" />
					</a>
					<a ng-if="item.type < 4 || item.type ==7" class="jump" style="padding-right: 0.2rem; height: 2rem; width: 2rem; text-align: center; line-height: 2rem;" href="{{item.linkurl}}" data-nocache="true">
						<i class="icon jinyunicon icon-kefu" style="color:red"></i>
					</a>
					<a ng-if="item.type > 3 && item.type !=7" class="jump" ng-click="pagedata.getmember.name=item.nickname;pagedata.getmember.kefuqr='';pagedata.openwxlink(item.linkurl)" style="padding-right: 0.2rem; height: 2rem; width: 2rem; text-align: center; line-height: 2rem;" href="javascript:;" data-nocache="true">
						<i class="icon jinyunicon icon-kefu" style="color:red"></i>
					</a>
				</div>
	</div>
	<div class="content-empty" ng-show="pagedata.list =='' ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有客服！</p>
	</div>
</div>
</div>
<div class="fui-navbar-pc right" style="bottom:180px;">
		<a href="javascript:;" ng-click="access_json('jy_kefu/home/')" class="external nav-item" ng-class="{'active':page.action=='home'}">
			<i class="icon icon-shouye"></i>
			<div class="text">选择客服</div>
		</a>
		<a href="javascript:;" ng-click="access_json('jy_kefu/mychat/')" class="external nav-item" ng-class="{'active':page.action=='chat'}">
			<i class="icon icon-shuffling-banner" ></i>
			<div class="text">消息管理</div>
			<div class="red-dot" ng-show="pagedata.noreadnum > 0">{{pagedata.noreadnum}}</div>
		</a>		
</div>
<div class="wap-qrcode-left">
    <p class="example1">我DE对话</p>
    <div class="wap-qrcode-image" id="qrcode-url" ng-init="qrcode(pagedata,'url')"><canvas width="256" height="256"></canvas></div>
    <p class="example1">微信“扫一扫”访问</p>
</div>
<div id="showqr"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog" style="width:240px;margin:auto">
			<div class="wap-qrcode-container" style="">
					<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
					<p ng-if="pagedata.getmember.kefuqr" class="example1">{{pagedata.getmember.name}}DE二维码</p>
					<p ng-if="!pagedata.getmember.kefuqr"  class="example1">进入微信公众号咨询</p>
					<div ng-if="pagedata.getmember.kefuqr" class="qrcode-image">
						<img ng-src="{{tomedia(pagedata.getmember.kefuqr) || '../core/resource/images/nopic.jpg'}}"/>
					</div>
					<div ng-if="!pagedata.getmember.kefuqr" class="qrcode-image">
						<div id="qrcode-shopurl"></div>
					</div>
					<p class="example1">打开微信，扫描二维码</p>
			</div>
		</div>
</div>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
scope.pagedata.openwxlink=function(linkurl){
	scope.tool.qr(linkurl,'qrcode-shopurl','160')
	$('#showqr').modal();
}
</script>